<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!-- basic styles -->
        <link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="../assets/css/font-awesome.min.css" />
        <link rel="stylesheet" href="../assets/css/ace.min.css" />
        <link rel="stylesheet" href="../assets/css/ace-rtl.min.css" />
        <link rel="stylesheet" href="../assets/css/ace-skins.min.css" />
        <link rel="stylesheet" href="../assets/js/plugin/tree/zTreeStyle.css" type="text/css">
    </head>
    <body>
        <div class="main-container">
            <div class="col-xs-12">
                <h3 class="header smaller lighter blue">用户权限管理</h3>
            </div>
            <div class="col-xs-12">
                <!-- PAGE CONTENT BEGINS -->
                <div class="row">
                    <div class="col-sm-6">
                        <div class="widget-box">
                            <div class="widget-header header-color-blue2">
                                <h4 class="lighter smaller">系统权限分配</h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main padding-8">
                                    <div id="treeDemo" class="ztree"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="widget-box">
                            <div class="widget-header header-color-green2">
                                <h4 class="lighter smaller">设备模块权限分配</h4>
                            </div>
                            <div class="widget-body">
                                <div class="widget-main padding-8">
                                    <div id="device_tree" class="ztree"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- PAGE CONTENT ENDS -->
            </div>
        </div>
        <script src="../assets/js/jquery.js"></script>
        <script src="../assets/js/bootstrap.min.js"></script>
        <script src="../assets/data/nav.js"></script>
        <script type="text/javascript" src="../assets/js/plugin/tree/jquery.ztree.core-3.5.js"></script>
        <script type="text/javascript" src="../assets/js/plugin/tree/jquery.ztree.excheck-3.5.js"></script>
        <script type="text/javascript">
            var setting = {
                check: {
                    enable: true
                },
                data: {
                    simpleData: {
                        enable: true
                    }
                }
            };
            var zNodes,zNodes1;
            $(function() {
                zNodes = nav;
                $.ajax({
                    "method": "POST",
                    "async": false,
                    "url": "../assets/data/permissionData.json",
                    data: {},
                    success: function(data) {
                        zNodes1 = data;
                    }
                });
                $.fn.zTree.init($("#treeDemo"), setting, zNodes);
                $.fn.zTree.init($("#device_tree"), setting, zNodes1);
            });
        </script>
    </body>
</html>
